package com.mlnx.service.common.exception;

import com.mlnx.common.entity.BaseExceptionMsg;

import lombok.Data;

/**
 * Created by amanda.shan on 2019/7/1.
 */
@Data
public class MutilDeviceServiceException extends RuntimeException {

    private String code;

    private String describe;

    public MutilDeviceServiceException(BaseExceptionMsg baseExceptionMsg) {
        super(baseExceptionMsg.getMsg());

        this.code = baseExceptionMsg.getCode();
        this.describe = baseExceptionMsg.getMsg();
    }

    public MutilDeviceServiceException() {
    }

    public MutilDeviceServiceException(String code, String describe) {
        super(describe);

        this.code = code;
        this.describe = describe;
    }

    public MutilDeviceServiceException(String message) {
        super(message);
    }

    public MutilDeviceServiceException(String message, Throwable cause) {
        super(message, cause);
    }

    public MutilDeviceServiceException(Throwable cause) {
        super(cause);
    }

    public MutilDeviceServiceException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }
}
